package ${packageName}.service.impl;
import java.io.Serializable;
import ${packageName}.service.BaseService;
import leap.orm.dao;
/**
 * @author jiangjintai
 * @param <T>
 * @param <B>
 *
 */
public abstract class BaseServiceImpl<T, B extends Serializable> implements BaseService<T, B> {
	
	@Override
	public T findById(B id) {
		return dao.findOrNull(Class<T> entityClass,id);
	}

	@Override
	public int insert(T entity){
		return dao.insert(Object entity);
	}
	
	@Override
	public int update(T entity){
		return dao.update(Object entity);
	}
	
	@Override
	public  Dao getDao(){
		return this.dao;
	}
}
